/* File Created: April 8, 2013 */
var BookModel = function () {
	var overView = {
		dataId: ko.observable(''),
		isPrepareDelete: ko.observable(false),
		title: ko.observable(''),
		language: ko.observable(''),
		thumbnail: ko.observable(''),
		thumbnailMedium: ko.observable(''),
		thumbnailMediumDisplay: ko.observable(''),
		author: ko.observable(''),
		year: ko.observable(''),
		status: ko.observable(''),
		numberComment: ko.observable(0),
        preview: ko.observable(false),
        downloadsAvailable: ko.observable(0),
		numberAnnotations: ko.observable(0),
		subExtraText: ko.observable(''),
		extraText: ko.observable('')
	},

		header = {
			title: ko.observable(''),
			thumbnailMedium: ko.observable(''),
			subtitle: ko.observable(''),
			extraText: ko.observable(''),
			subExtraText: ko.observable(''),
			authorsLastNameFirst: ko.observable(''),
			ourcopyright: ko.observable(''),
			pages: ko.observable(''),
			isbn: ko.observable(''),
			flashfile: ko.observable(''),
			buyTheBookTitle: ko.observable(''),
			type: ko.observable(''),
			language: ko.observable(''),
			year: ko.observable(''),
			audioFile: ko.observable(''),
			audioFileDisplay: ko.observable(''),
			otherLanguges: ko.observableArray(),
			purchase: ko.observable(''),
			fullText: {
				text: ko.observable(''),
				type: ko.observable('')
			}
		},

		takeaway = {
			title: ko.observable(''),
			takeaways: ko.observableArray()
		},

		rating = {
			subtitle: ko.observable(''),
			ratings: ko.observableArray()
		},

		relevance = {
			title: ko.observable(''),
			learnintro: ko.observable(''),
			learntopics: ko.observableArray(),
			recommendation: {
				title: ko.observable(''),
				text: ko.observable('')
			}
		},

		abstract = {
			title: ko.observable(''),
			text: ko.observable('')
		},

		aboutAuthor = {
			title: ko.observable(''),
			text: ko.observable('')
		},

		toJSON = function () {
			return ko.toJS(this);
		},

		quote = {
			title: ko.observable(''),
			quotes: ko.observableArray()
		};
		
	return {
		overView: overView,
		header: header,
		takeAway: takeaway,
		rating: rating,
		relevance: relevance,
		toJSON: toJSON,
		abstract: abstract,
		aboutAuthor: aboutAuthor,
		quote: quote
	};

};

var LanguageModel = function () {
	this.dataId = ko.observable('');
	this.text = ko.observable('');
	this.language = ko.observable('');
};

var TakeAway = function () {
	this.text = ko.observable('');
	this.sequence = ko.observable('');
};

var Rating = function () {
	this.caption = ko.observable('');
	this.value = ko.observable('');
	this.sequence = ko.observable('');
};

var LearnTopic = function () {
	this.number = ko.observable('');
	this.text = ko.observable('');
};

var Recommendation = function () {
	this.title = ko.observable('');
	this.text = ko.observable('');
};

var Author = function () {
	this.title = ko.observable('');
	this.text = ko.observable('');
};

var Quote = function () {
	this.text = ko.observable('');
	this.sequence = ko.observable('');
};
var Abstract = function () {
	this.text = ko.observable('');
	this.title = ko.observable('');
};
